<?php
import("com.miho.io.request.BaseRequest");
class GetRequest extends BaseRequest {
	public function __construct(){
		parent::__construct($_GET);
		$this->parseUrl();
	}
	
	public function parseUrl(){
		$url=null;
		try{
			$url = $this->getString("url"); 
		}catch (NullPointerException $e){
			return;
		}
		$props = explode('/',$url);
		if (isset($props[0])){
			$this->_requestArray['action'] = $props[0]; 
		}
		if(isset($props[1])){
			$this->_requestArray['eventName'] = $props[1];
		}
		if(isset($props[2])){
			$this->_requestArray['eventType'] = $props[2];
		}
		if (sizeof($props)>3) {
			$this->_requestArray['eventParams']=array_slice($props,3);
		}else{
			$this->_requestArray['eventParams']=array();
		}
		
	}
}

?>